home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: MegaDisc
/
MegaDisc 36 (1993-11)(MegaDisc Digital Publishing)(AU)(Disk 2 of 2).zip
/
MegaDisc 36 (1993-11)(MegaDisc Digital Publishing)(AU)(Disk 2 of 2).adf
/
ARexx
/
Modular
/
AddGad.mod
< prev
next >
Wrap
Text File
|
1993-08-19
|
1KB
|
24 lines
/* Add string or boolean gadget */
AddGad:
t = 'Edit the entry shown here to suit your needs. For a string',
'\gadget, retain all the commas, using two adjacent commas',
'\if you want no prompting text to appear in the gadget.',
'\\For a Boolean gadget, omit the size and the third comma,',
'\and include back-slashes to create multiple lines of text.',
'\\Irrespective of type, the first two gadgets you add here',
'\will be given jobs: the first will put the date and time in',
'\the title bar; the second will deactivate both the gadgets,',
'\though their images will remain in view.'
u = 'x,y,Prompting text,Horizontal size in pixels'
s = Request(50,20,t,u,'Okay','Cancel')
if s ~= '' then do
parse var s x ',' y ',' txt ',' size .
/* 'gadno' keeps a tally of added gadgets so that each has
a unique defining number. Then we can use them. */
gad = GetClip('gadno') ; gad = gad + 1
if size > 0 then call AddGadget(HO,x,y,gad,txt,'%l %d',size)
else call AddGadget(HO,x,y,gad,txt,'%l %d %g')
reset = SetClip('gadno',gad)
end
return